package com.example.sid.ui.fragments.login

import android.widget.Button
import androidx.fragment.app.Fragment
import com.example.sid.R
import com.example.sid.ui.fragments.utils.navigateTo

/**
 * Проходной фрагмент разделяющий функционал фичи.
 */

class LoginRootFragment : Fragment(R.layout.fragment_login_root) {

	private val setUserIdWay: Button get() = requireView().findViewById(R.id.set_user_id_way)
	private val loginWithIdWay: Button get() = requireView().findViewById(R.id.login_with_id_way)
	private val loginWithIdToCustomtabWay: Button get() = requireView().findViewById(R.id.login_with_id_to_customtab_way)
	private val logoutWay: Button get() = requireView().findViewById(R.id.logout_way)
	private val getIdAuthResultWay: Button get() = requireView().findViewById(R.id.get_id_auth_result_way)
	private val sendOtherAuthWay: Button get() = requireView().findViewById(R.id.send_other_auth_way)
	private val standsWay: Button get() = requireView().findViewById(R.id.stands_way)

	override fun onStart() {
		super.onStart()
		setUserIdWay.setOnClickListener {
			navigateTo(LoginRootFragmentDirections.actionLoginRootFragmentToSetUserIDFragment())
		}
		loginWithIdWay.setOnClickListener {
			navigateTo(LoginRootFragmentDirections.actionLoginRootFragmentToLoginWithIDFragment())
		}
		loginWithIdToCustomtabWay.setOnClickListener {
			navigateTo(LoginRootFragmentDirections.actionLoginRootFragmentToLoginWithIDToCustomTabFragment())
		}
		logoutWay.setOnClickListener {
			navigateTo(LoginRootFragmentDirections.actionLoginRootFragmentToLogoutFragment())
		}
		getIdAuthResultWay.setOnClickListener {
			navigateTo(LoginRootFragmentDirections.actionLoginRootFragmentToGetIDAuthResultFragment())
		}
		sendOtherAuthWay.setOnClickListener {
			navigateTo(LoginRootFragmentDirections.actionLoginRootFragmentToSendOtherAuthFragment())
		}
		standsWay.setOnClickListener {
			navigateTo(LoginRootFragmentDirections.actionLoginRootFragmentToStandsFragment())
		}







	}
}